package com.seal.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.seal.dao.ICompanyInfo2Dao;
import com.seal.model.CompanyInfo2;
import com.seal.service.ICompanyInfo2Service;

@Service("companyInfo2ServiceImpl")
@Transactional(readOnly = true)
public class CompanyInfo2ServiceImpl implements ICompanyInfo2Service {

	@Resource(name = "companyInfo2DaoImpl")
	private ICompanyInfo2Dao companyInfo2Dao;

	@Transactional(propagation = Propagation.REQUIRED,readOnly = false, rollbackForClassName = "Exception")
	public void addCompanyInfo2(CompanyInfo2 ca) throws Exception {
		companyInfo2Dao.addCompanyInfo2(ca);
	}

	public CompanyInfo2 getCompanyInfo2ById(Long companyId,Short sid)
			throws Exception {
		return companyInfo2Dao.getCompanyInfo2ById(companyId,sid);
	}

	@Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackForClassName = "Exception")
	public void updateCompanyInfo2(CompanyInfo2 ca) throws Exception {
		companyInfo2Dao.updateCompanyInfo2(ca);
	}

}
